<div id="current_post">
  <%= render :partial=>"admin/posts/show_post_body", :locals=>{:post => @post} %>
</div>
<div id="post_list">
  <ul>
    <% session[:return_to] = nil %>
    <% for post in @posts %>
      <li><%= link_to("D", admin_delete_post_path(post.id), :class=>"button")  %><%= link_to("E", edit_post_path(post.id), :class=>"button")  %><%= link_to_remote( (is_sticky(post.id) ? "[s] " : "") + post.title, :url => "/admin/show_post_body/#{post.id}", :method =>"get",:update => "current_post"  ) %></li>

      <%  children = post.find_children %>
      <% if !children.nil? && !children.empty? %>
        <ul>
          <% children.each do |pc| %>
            <li><%= link_to("D", admin_delete_post_path(pc.id), :class=>"button")  %><%= link_to("E", edit_post_path(post.id), :class=>"button")  %><%= link_to_remote( (is_sticky(pc.id) ? "[s] " : "") + pc.title, :url => "/admin/show_post_body/#{pc.id}", :method =>"get",:update => "current_post"  ) %></li>
          <% end %>
        </ul>
      <% end %>

    <% end %>
  </ul>
</div>